Introduction to the COIN-OR Optimization Suite and Open Source Modeling Tools
This is a short course that introduces the COIN-OR Optimization Suite and some basic concepts in algebraic modeling. It was first presented as a tutorial at the 43rd Meeting of the Operations Research Society of South Africa in Parys, South Africa. An expanded version was presented at the INFORMS Computing Society Conference in Richmond, Virginia in January, 2015. The first three lectures were presented at COIN fORgery, a workshop at the Institute for Mathematics, In October 2018. The course is now in seven parts.
- The first part introduces COIN-OR and includes an overview of all the COIN-OR projects.
- The second part discusses aspects of project management, the “COIN-OR Way” and especially emphasizes the move to modern tools, such as git.
- The third part describes how to build and install the projects in the Optimization Suite on all platforms, as well as discussing COIN-ORs tools for unit testing, continuous integration, and automated building and deployment of binaries.
- The fourth part introduces the COIN-OR Optimization Suite
and provides a basic introduction to doing development with those projects integrated into the Optimization Suite. - The fifth part introduces Python and gives an overview of the Python-based tools available in COIN-OR.
- The sixth part is an introduction to some of the modeling tools that can be used to interface with the COIN-OR tools. The applications are primarily from financial optimization, but they are chosen to introduce a number of fundamental concepts that arise in algebraic modeling. The models are developed in several different modeling languages in order to compare and contrast the features of each. Some of the material on algebraic modeling is distilled from a course I taught in financial optimization.
- Finally, the seventh part contains further examples of more advanced techniques, such as non-linear, discrete, and stochastic models.
Lecture Slides
- Part 1: Introduction to COIN-OR
- Part 2: COIN-OR Project Management
- Part 3: Building and Testing the COIN-OR Optimization Suite
- Part 4: Developing with the COIN-OR Optimization Suite
- Part 5: Python and COIN-OR
- Part 6: Algebraic Modeling and COIN-OR
- Part 7: Advanced Algebraic Modeling
Tools
To follow along at home, you can install the following tools, which are almost all open source and freely available.
- COIN-OR Solvers
- Windows: Download Installer for 32-bit binaries built with MSVC9 for compatibility with Python.
- Linux/OS X: Either Download Source (build instructions in Part 1) or install packages in Debian or Fedora (subject to availability).
- For Linux, there are completely static binaries available which should work on most Linux distributions.
- Python is the base for several of the modeling languages used.
- There are many ways to get Python.
- You will almost surely want some of the standard scientific packages such as NumPy.
- Modeling Languages
- Other Python Packages
- CyLP can be installed with
easy_install cylp
on WIndows (for building on Linux/OS X, see slides). - yaposib can be built and installed with instruction in slides (you need to install boost Python first, though, which is a pain).
- GiMPy can be installed with
easy_install coinor.gimpy
. - GrUMPy can be installed with
easy_install coinor.grumpy
(forPolyhedron2D
you need to build and install pypolyhedron). - CuPPy can be installed with
easy_install coinor.cuppy
(you also need to install CyLP).
- CyLP can be installed with
- Other Recommended Software
- The excellent and open source Solver Studio Plug-in for Excel is used in a number of the examples.
- The Eclipse Development Environment is a general-purpose open source IDE with a very nice open source plug-in for Python development.
- The PyDev Eclipse Plug-in is for editing and debugging of Python scripts.
- For building on Windows, it is recommended to install MSys
- Get the MinGW installer from here.
- Do
mingw-get install msys
. - Add
C:\MinGW\msys\1.0\bin
to yourPATH
. - If you are planning to build with Visual Studio compilers, make sure those are installed.
- If you are planning to build with gcc, then additionally do
mingw-get install gcc g++ gfortran
and addC:\MinGW\bin
to youPATH
.
Models
The file containing Solver Studio Examples shows how to model most of the below problems in Excel.
Bond Selection Problem
- AMPL Files
- PuLP Scripts
- MPS Files
Capacitated Facility Location
- CFLP in PuLP
- CFLP in DipPy
- Instance Data
Portfolio Dedication Problem
- AMPL Files
- PuLP Scripts
- Pyomo Scripts
- ZMPL Files
- LP Files
Short Term Financing
If you find something here useful, buy me a beer!